package com.wiseMen.wechat.user;

import java.util.Date;

import javax.persistence.Table;

import org.sword.wechat4j.user.Tag;
import org.sword.wechat4j.util.WeChatUtil;

import com.wiseMen.core.dao.BaseEntity;

/**
 * 用户标签管理
 * @author 吴人龙
 */
@Table(name = "WC_TAG")
public class WechatUserTagEntity implements BaseEntity{

	private static final long serialVersionUID = 1294793167595501220L;
	
	private String id;
	private String name;//标签名称
	private Integer count;//此标签下粉丝数
	private Integer invalid;//是否有效，0：无效 1：有效；无效说明微信公众平台上找不到该标签
	private Date syncTime;
	
	public WechatUserTagEntity(){
		super();
	}
	public WechatUserTagEntity(Tag tag){
		if(tag!=null){
			this.id = tag.getId()+"";
			this.name = WeChatUtil.toUtf8(tag.getName());
			this.count = tag.getCount();
		}
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public Integer getInvalid() {
		return invalid;
	}
	public void setInvalid(Integer invalid) {
		this.invalid = invalid;
	}
	public Date getSyncTime() {
		return syncTime;
	}
	public void setSyncTime(Date syncTime) {
		this.syncTime = syncTime;
	}
}
